﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CourseArraging.Common;
using Microsoft.Reporting.WinForms;

namespace CourseArraging.Frm.bbxx
{
    public partial class FrmStuZmap : Form
    {
        /// <summary>
        /// 版权所有
        /// 石世特@温州医学院 sst330381@gmail.com
        /// </summary> 
        public FrmStuZmap()
        {
            InitializeComponent();
        }
        public FrmStuZmap(DataTable dtStuZm)
            :this()
        {
            DataTable dt = dtStuZm.Copy();
            reportViewer1.LocalReport.ReportPath = GlobalVar.filePath + @"\bb\BbStuZM.rdlc";
            dt.Columns["6-8:00-10:00"].ColumnName = "sta1";
            dt.Columns["6-10:00-12:00"].ColumnName = "sta2";
            dt.Columns["6-13:00-15:00"].ColumnName = "sta3";
            dt.Columns["6-15:00-17:00"].ColumnName = "sta4";
            dt.Columns["6-18:00-20:00"].ColumnName = "sta5";
            dt.Columns["6-20:00-22:00"].ColumnName = "sta6";
            dt.Columns["7-8:00-10:00"].ColumnName = "sun1";
            dt.Columns["7-10:00-12:00"].ColumnName = "sun2";
            dt.Columns["7-13:00-15:00"].ColumnName = "sun3";
            dt.Columns["7-15:00-17:00"].ColumnName = "sun4";
            dt.Columns["7-18:00-20:00"].ColumnName = "sun5";
            dt.Columns["7-20:00-22:00"].ColumnName = "sun6";

            //ReportParameter xybh = new ReportParameter("xybh",xybbEntity.XyId);

            //this.reportViewer1.LocalReport.SetParameters(
            //new ReportParameter[] { xybh, sksj, skdd, mzcs, mcks, ksfz, ksrq, jsrq, kcmc, fkfs, jemks });

            ReportDataSource rds = new ReportDataSource("DataSet1", dt);
            reportViewer1.LocalReport.DataSources.Add(rds);
        }

        private void FrmStuZmap_Load(object sender, EventArgs e)
        {
            reportViewer1.RefreshReport();
        }
    }
}
